Support REFRESH MATERIALIZED VIEW#15996
Conversation
|
Let's rebase this PR on top of #15910. That one is one a shape that won't have major interface or structure change. |
I will do it and come back. |
ce11808 to
3579314
Compare
984033e to
3794b30
Compare
|
Have only looked at the query building part of it, have left some comments for clarification. |
highker
left a comment
There was a problem hiding this comment.
Let's clean up the initial comments, rebase, and have another round of review
7a0c4b7 to
b141d3d
Compare
|
Can we please resolve the the comments which are already addressed? |
jainxrohit
left a comment
There was a problem hiding this comment.
Left the change in comments
|
Addressed comments, and also changed TestHiveLogicalPlanner to use REFRESH MV to write to MVs and enabled the test cases. |
|
@gggrace14 are we planning to fix testMaterializedViewForJoin test as part of this PR? I see that testMaterializedViewForJoinWithMultiplePartitions as well is disabled. Can we enable it if there are no issues? |
There was a problem hiding this comment.
Overall it looks good to me. Lets make the final set of requested changes.
I would have preferred to keep the query rewriting logic at one place, as it is easier to read and debug. But may be we can create a task for refactoring it.
cc: @highker
Yes, testMaterializedViewForJoinWithMultiplePartitions is enabled now and it is good with replacing insert w/ refresh. Fixing testMaterializedViewForJoin needs more complete population of the columnMappings structure, which is orthogonal to REFRESH and deserves a standalone PR. Filing the issue #16220 and updating the TODO. |
I was also talking about test method |
Yes, testMaterializedViewForJoinWithMultiplePartitions is enabled now and it is good with replacing insert w/ refresh. |
Filing the issue #16220 and updating the TODO. |
There was a problem hiding this comment.
Remove this interface. Let's only keep the constructor(s)
There was a problem hiding this comment.
Use the constructor instead of withXXX
There was a problem hiding this comment.
No need to call it viewDefinitionWithRefreshColumns, just reuse viewDefinition
6b7d0db to
17bd4f4
Compare
|
@gggrace14 There are no release notes on this PR. Can you please add them. |
My bad, @gggrace14, let add no release notes for this PR. |
|
Yes, will do! |
Depended by https://github.com/facebookexternal/presto-facebook/pull/1509